//系统配置-操作管理-配置文件
App.util.ns('Admin.Access.OperationGroup');
Admin.Access.OperationGroup.Conf = {
    columns: [
        {name: '名称', value: 'name', main: true},
        {name: '标识码', value: 'code', width: '250px', style: 'text-align: left;'},
        {name: '权限类型', width: '70px', value: function (item) {
            switch (item.type + '') {
                case '1':
                    return '操作';
                case '2':
                    return '数据';
                default:
                    return '';
            }
        }}
    ],
    form: [
        {type: 'hidden', name: 'group_id'},
        {type: 'input', name: 'name', title: '名称', rule: {
            type: 'str',
            range: [1, 250]
        }},
        {type: 'input', name: 'code', title: '标识码', rule: {
            type: 'str',
            range: [1, 250]
        }},
        {type: 'select', name: 'type', title: '权限类型', items: [
            ['1', '操作'],
            ['2', '数据']
        ], onChange: function (self) {
            if (self.value() + '' === '2') {
                self.form.items.data_source.show();
            } else {
                self.form.items.data_source.hide();
            }
        }},
        {type: 'admin-access-operationGroup-dataSource', name: 'data_source', title: '数据源'}
    ]
};